#coding=gbk
import gate
import root
import sys
import string

if (len(sys.argv) == 2):
    server = gate.GatewayServer("Gate" + sys.argv[1])
    server.goInit(string.atoi(sys.argv[1]))
    server.start()
else:
    server = gate.GatewayServer("Gate" + "0")
    server.goInit(0)
    server.start()